<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>
        <div class="post">

            <h2 class="title">Cadastro do Diploma</h2>

            <h:panelGroup id="painelMensagens" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>

            <div id="stylized" class="myform">

                <h:form>
                    <table>
                        <tr>
                            <th><h:outputLabel>Número do Arquivo: </h:outputLabel></th>
                            <td><h:outputText  value="#{DiplomaController.diploma.id}"  /></td>
                        </tr>
                        <tr>
                            <th><h:outputLabel>Aluno: </h:outputLabel></th>
                            <td><h:outputText  value="#{DiplomaController.diploma.aluno}"  /></td>
                        </tr>
                        <tr>
                            <th><h:outputLabel>Curso: </h:outputLabel></th>
                            <td><h:outputText  value="#{DiplomaController.diploma.curso.nome}" /></td>
                        </tr>
                        <tr>
                            <th><h:outputLabel>E-mail: </h:outputLabel></th>
                            <td><h:outputText  value="#{DiplomaController.diploma.email}" /></td>
                        </tr>
                    </table>
                    <h:commandButton styleClass="button" action="#{DiplomaController.novo}" value="Novo" />
                    <h:commandButton styleClass="button" action="#{PageManager.setPageInserirDiploma}" value="Editar" />
                    <h:commandButton styleClass="button" action="#{DiplomaController.destroy}" value="Remover" />
                    <br />

                    <h2>Situação do Diploma</h2>

                                        <p:dataTable var="situacaoDoDiploma" value="#{DiplomaController.situacaoDosDiplomas}" emptyMessage="Nenhum Situação Encontrado" paginator="false">
                        <p:column sortBy="#{situacaoDoDiploma.dia}">
                            <f:facet name="header">
                                <h:outputText value="Data" />
                            </f:facet>
                            <h:outputText value="#{situacaoDoDiploma.dia.date}/#{situacaoDoDiploma.dia.month}/#{situacaoDoDiploma.dia.year + 1900}" />
                        </p:column>
                        <p:column sortBy="#{situacaoDoDiploma.descricao}">
                            <f:facet name="header">
                                <h:outputText value="Descricao" />
                            </f:facet>
                            <h:outputText value="#{situacaoDoDiploma.descricao}" />
                        </p:column>
                        <p:column sortBy="#{situacaoDoDiploma.situacaoDiploma}">
                            <f:facet name="header">
                                <h:outputText value="Data" />
                            </f:facet>
                            <h:outputText value="#{situacaoDoDiploma.situacaoDiploma.situacao}" />
                        </p:column>

                                            <h:commandButton styleClass="button" action="#{SituacaoDoDiplomaController.novo}" value="Remover" />
                    </p:dataTable>


                </h:form>






            </div>
        </div>
    </body>
</html>
